import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const state = {
  count: 1
}

const mutations = {
  incr(state, data) {
    state.count = state.count + data
  }
}

const actions = {
  incr({ commit }, data) {
    commit('incr', data)
  }

}

const getters = {
}

export default new Vuex.Store({
  state,
  mutations,
  actions,
  getters
})
